3.41 \(\int \frac{\cos (a+\frac{b}{x^2})}{x} \, dx\)

Optimal. Leaf size=25 \[ \frac{1}{2} \sin (a) \text{Si}\left (\frac{b}{x^2}\right )-\frac{1}{2} \cos (a) \text{CosIntegral}\left (\frac{b}{x^2}\right ) \]

[Out]

-(Cos[a]*CosIntegral[b/x^2])/2 + (Sin[a]*SinIntegral[b/x^2])/2

________________________________________________________________________________________

Rubi [A]  time = 0.0277989, antiderivative size = 25, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 12, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.25, Rules used = {3378, 3376, 3375} \[ \frac{1}{2} \sin (a) \text{Si}\left (\frac{b}{x^2}\right )-\frac{1}{2} \cos (a) \text{CosIntegral}\left (\frac{b}{x^2}\right ) \]

Antiderivative was successfully verified.

[In]

Int[Cos[a + b/x^2]/x,x]

[Out]

-(Cos[a]*CosIntegral[b/x^2])/2 + (Sin[a]*SinIntegral[b/x^2])/2

Rule 3378

Int[Cos[(c_) + (d_.)*(x_)^(n_)]/(x_), x_Symbol] :> Dist[Cos[c], Int[Cos[d*x^n]/x, x], x] - Dist[Sin[c], Int[Si
n[d*x^n]/x, x], x] /; FreeQ[{c, d, n}, x]

Rule 3376

Int[Cos[(d_.)*(x_)^(n_)]/(x_), x_Symbol] :> Simp[CosIntegral[d*x^n]/n, x] /; FreeQ[{d, n}, x]

Rule 3375

Int[Sin[(d_.)*(x_)^(n_)]/(x_), x_Symbol] :> Simp[SinIntegral[d*x^n]/n, x] /; FreeQ[{d, n}, x]

Rubi steps

\begin{align*} \int \frac{\cos \left (a+\frac{b}{x^2}\right )}{x} \, dx &=\cos (a) \int \frac{\cos \left (\frac{b}{x^2}\right )}{x} \, dx-\sin (a) \int \frac{\sin \left (\frac{b}{x^2}\right )}{x} \, dx\\ &=-\frac{1}{2} \cos (a) \text{Ci}\left (\frac{b}{x^2}\right )+\frac{1}{2} \sin (a) \text{Si}\left (\frac{b}{x^2}\right )\\ \end{align*}

Mathematica [A]  time = 0.0452284, size = 24, normalized size = 0.96 \[ \frac{1}{2} \left (\sin (a) \text{Si}\left (\frac{b}{x^2}\right )-\cos (a) \text{CosIntegral}\left (\frac{b}{x^2}\right )\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[Cos[a + b/x^2]/x,x]

[Out]

(-(Cos[a]*CosIntegral[b/x^2]) + Sin[a]*SinIntegral[b/x^2])/2

________________________________________________________________________________________

Maple [A]  time = 0.037, size = 22, normalized size = 0.9 \begin{align*} -{\frac{\cos \left ( a \right ) }{2}{\it Ci} \left ({\frac{b}{{x}^{2}}} \right ) }+{\frac{\sin \left ( a \right ) }{2}{\it Si} \left ({\frac{b}{{x}^{2}}} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(a+b/x^2)/x,x)

[Out]

-1/2*Ci(b/x^2)*cos(a)+1/2*Si(b/x^2)*sin(a)

________________________________________________________________________________________

Maxima [C]  time = 1.35032, size = 58, normalized size = 2.32 \begin{align*} -\frac{1}{4} \,{\left ({\rm Ei}\left (\frac{i \, b}{x^{2}}\right ) +{\rm Ei}\left (-\frac{i \, b}{x^{2}}\right )\right )} \cos \left (a\right ) - \frac{1}{4} \,{\left (i \,{\rm Ei}\left (\frac{i \, b}{x^{2}}\right ) - i \,{\rm Ei}\left (-\frac{i \, b}{x^{2}}\right )\right )} \sin \left (a\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(a+b/x^2)/x,x, algorithm="maxima")

[Out]

-1/4*(Ei(I*b/x^2) + Ei(-I*b/x^2))*cos(a) - 1/4*(I*Ei(I*b/x^2) - I*Ei(-I*b/x^2))*sin(a)

________________________________________________________________________________________

Fricas [A]  time = 1.58963, size = 123, normalized size = 4.92 \begin{align*} -\frac{1}{4} \,{\left (\operatorname{Ci}\left (\frac{b}{x^{2}}\right ) + \operatorname{Ci}\left (-\frac{b}{x^{2}}\right )\right )} \cos \left (a\right ) + \frac{1}{2} \, \sin \left (a\right ) \operatorname{Si}\left (\frac{b}{x^{2}}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(a+b/x^2)/x,x, algorithm="fricas")

[Out]

-1/4*(cos_integral(b/x^2) + cos_integral(-b/x^2))*cos(a) + 1/2*sin(a)*sin_integral(b/x^2)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\cos{\left (a + \frac{b}{x^{2}} \right )}}{x}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(a+b/x**2)/x,x)

[Out]

Integral(cos(a + b/x**2)/x, x)

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\cos \left (a + \frac{b}{x^{2}}\right )}{x}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(a+b/x^2)/x,x, algorithm="giac")

[Out]

integrate(cos(a + b/x^2)/x, x)